/**
 * 获取 window.location.hash 参数
 * @param {*} hash
 * @returns 
 */
export function getURLParams(hash) {
    const hashArray = (hash || window.location.hash).split('?');
    return hashArray.length > 1
        ? hashArray[1].split('&').reduce((acc, cur) => {
            const [key, value] = cur.split('=');
            acc[key] = value;
            return acc;
        }, {})
        : {};
}